home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.02 Feb 91 / 4th Debugger Appl / Calendar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-15  |  2.2 KB  |  53 lines  |  [TEXT/KAHL]

  1. /************************************************************************/
  2. /*                                                                          */
  3. /*    Source   - Calendar.h                                                */
  4. /*    Author   - Alexander S. Colwell, Copyright © 1990                    */
  5. /*                                                                        */
  6. /*    Purpose     - This is Calendar's include file                            */
  7. /*                                                                        */
  8. /************************************************************************/
  9.  
  10. #ifndef _Calendar_                    /* Check if has not been include    */
  11. #define    _Calendar_                    /* Mark it included                    */
  12.  
  13. #include "4th Class.h"                /* 4th Ext Area Class defs            */
  14.     
  15. #define    headerHeight    16            /* Header height for month/year area*/
  16.  
  17. struct CCalendar : C4th {            /* Calendar object data structure    */
  18.  
  19.                                     /* Variable instances                */
  20.     short    month;                    /* Current month                    */
  21.     short    year;                    /* Current year                        */
  22.     short    dayIndex;                /* Day idx in 1st row cell            */
  23.     unsigned long daySelect;        /* Current day selection            */
  24.     RgnHandle nextMonth;            /* Next month control handle        */
  25.     RgnHandle prevMonth;            /* Previous month control handle    */
  26.     
  27.                                     /* Working variable definitions        */
  28.     short    dayWidth;                /* Day width                        */
  29.     short    dayHeight;                /* Day height                        */
  30.     
  31.                                     /* Method instances                    */
  32.     void    IExtArea(short);        /* External area initialization        */
  33.     void    Close(void);            /* Close external area                */
  34.     void    Cursor(Point);            /* Cursor                            */
  35.     void    SetupValues(void);        /* Setup working values                */
  36.     void    Draw(void);                /* Draw method                        */
  37.     void    DrawDay(char *,short,short);/* Draw cell                    */
  38.     void    HiliteDay(short,short);    /* Hilite day                        */
  39.     void    DayRect(Rect *,short,short);/* Get day rect area            */
  40.     short    MakeDayOutline(void);    /* Make day outline rgn using tmpRgn*/
  41.     void    Select(void);            /* Do ext area selection            */
  42.     void    Deselect(void);            /* Do ext area deselection            */
  43.     void    Scroll(void);            /* Scroll ext area                    */
  44.     void    DoClick(Point,short,long);/* Do click method                */
  45.     short    GetDays(void);            /* Get number of days for this month*/
  46.     short    GetDayIndex(void);        /* Get day's index base offset        */
  47.     short    GetRowIndex(short);        /* Get row index base offset        */
  48.     short    GetColumnIndex(short);    /* Get column index base offset        */
  49.     short    LeapYear(void);            /* Check if it's leap year            */
  50.     };
  51.     
  52. #endif
  53.